home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / set_this_object < prev    next >
Text File  |  2001-04-06  |  2KB  |  38 lines

  1. SYNOPSIS
  2.         void set_this_object(object object_to_pretend_to_be);
  3.  
  4. DESCRIPTION
  5.         This is a privileged function, only to be used in the master
  6.         object or in the simul_efun object.
  7.  
  8.         It changes the result of this_object() in the using function,
  9.         and the result of previous_object() in functions called in
  10.         other objects by call_other().        Its effect will remain till
  11.         there is a return of an external function call, or another
  12.         call of set_this_object(). While executing code in the master
  13.         object's program or the primary simul_efun object's program,
  14.         set_this_object() is granted even if this_object() is altered
  15.         by set_this_object(). This does not apply to functions
  16.         inherited from other programs.
  17.  
  18.         Use it with extreme care to avoid inconsistencies.  After a
  19.         call of set_this_object(), some LPC-constructs might behave in
  20.         an odd manner, or even crash the system. In particular, using
  21.         global variables or calling local functions (except by
  22.         call_other) is illegal.
  23.  
  24.         With the current implementation, global variables can be
  25.         accessed, but this is not guaranteed to work in subsequent
  26.         versions.
  27.  
  28.         Allowed are call_other, map functions, access of local
  29.         variables (which might hold array pointers to a global array),
  30.         simple arithmetic and the assignment operators.
  31.  
  32. BUG
  33.         After set_this_object(), references to global variables and
  34.         local function should be actively caught and rejected.
  35.  
  36. SEE ALSO
  37.         this_object(E), set_this_player(E)
  38.